package com.example.demo.testdemo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * 订单类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class OrderStep {
    private long orderId; //订单id
    private String desc;  //订单描述

    /**
     * 生成模拟订单数据
     */
    static List<OrderStep> buildOrders(){
        List<OrderStep> orderList  = new ArrayList<>();
        orderList.add(new OrderStep(111111L,"create order"));
        orderList.add(new OrderStep(222222L,"create order"));
        orderList.add(new OrderStep(333333L,"create order"));
        orderList.add(new OrderStep(111111L,"pay order"));
        orderList.add(new OrderStep(222222L,"pay order"));
        orderList.add(new OrderStep(333333L,"create order"));
        orderList.add(new OrderStep(111111L,"push order"));
        orderList.add(new OrderStep(111111L,"finish order"));
        orderList.add(new OrderStep(222222L,"push order"));
        orderList.add(new OrderStep(333333L,"pay order"));
        return orderList;
    }
}
